
clear

use "C:\Users\lilly\OneDrive\Documents\Glen\FPASubmission\FinalVersion_FPA_masterdata_Sep13_2021.dta"

*&&&&&&&&&&&&&&&&&&&&&&Table 2: Model 1-4


*Model 1
mixed lnSOE_energy_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:  

*Model 2
mixed lnPrivate_energy_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:
*Model 3
mixed lnSOE_non_energy_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:  
*Model 4 
mixed lnPrivate_non_energy_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:  



***********************Table 3: Model 5-8
*&&&&&&&&&&&&&&&&&&&&&&Table 3


*Model 5
mixed lnSOE_energy_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:  

*Model 6
mixed lnPrivate_energy_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:

*Mode1 7
mixed lnSOE_non_energy_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:  

*Model 8
mixed lnPrivate_non_energy_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:  

***********************Table 4: Model 9-14



*&&&&&&&&&&&&&&&&&&&&&Table 4
*Model 9
mixed lnSOE_primary_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode:  
*Model 10
mixed lnPrivate_primary_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: 

*Model 11
mixed lnSOE_secondary_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: 
*Model 12
mixed lnPrivate_secondary_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: 

*Model 13
mixed lnSOE_tertiary_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:  
*Model 14
mixed lnPrivate_tertiary_dollarX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:



*****************Table 5: Model 15-16
*Model 15
mixed lnSOE_primary_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode:  
*Model 16
mixed lnPrivate_primary_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: 

*Model 17
mixed lnSOE_secondary_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: 
*Model 18
mixed lnPrivate_secondary_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: 

*Model 19
mixed lnSOE_tertiary_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:  
*Model 20
mixed lnPrivate_tertiary_dollarX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode:







*******************Robustness Checks in Appendix 
*&&&&&&&&&&&&&&&&&&&&Check on Overdispersion
****install overdisp to identify whether we should use poisson or negative binomial for the count DV 
ssc install overdisp

*define the list of explanatory variables 
global xlist wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme
*test overdispersion to decide whether to use poisson or negative binomial.  If p value is significant, we can regject the null and use negative binomial. 
poisson SOE_energyX $xlist
predict uhat

gen cat=SOE_energyX-uhat
gen dog=cat*cat
generate ystar = (dog- SOE_energyX)/uhat
regress ystar uhat, noconstant


*******************Table Appendix A2
*Model 21
menbreg SOE_energyX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode: , irr 

*summary stats
menbreg SOE_energyX wgi_rule_of_law_lag      ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode: , irr 
sum SOE_energyX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme if e(sample)


*Model 22
menbreg Private_energyX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode: , irr 
*Model 23
menbreg SOE_non_energyX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 
*Model 24
menbreg Private_non_energyX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 



*&&&&&&&&&&&&&&&&&&&&&Table Appendix A3
*Model 25
menbreg SOE_primaryX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode: , irr 
*Model 26
menbreg Private_primaryX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 

*Model 27
menbreg SOE_secondaryX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 
*Model 28 
menbreg Private_secondaryX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 

*Model 29
menbreg SOE_tertiaryX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 
*Model 30
menbreg Private_tertiaryX   wgi_rule_of_law_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 



*******************Table Appendix A4
*&&&&&&&&&&&&&&&&&&&&
*Model 31
menbreg SOE_energyX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode: , irr 

*summary stats
menbreg SOE_energyX lji_lag      ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode: , irr 
sum SOE_energyX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme if e(sample)


*Model 32
menbreg Private_energyX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode: , irr 
*Model 33
menbreg SOE_non_energyX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 
*Model 34
menbreg Private_non_energyX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 


*&&&&&&&&&&&&&&&&&&&&&Table Appendix A5
*Model 35
menbreg SOE_primaryX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme || ccode: , irr 
*Model 36
menbreg Private_primaryX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 

*Model 37
menbreg SOE_secondaryX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 
*Model 38 
menbreg Private_secondaryX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 

*Model 39
menbreg SOE_tertiaryX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr 
*Model 40
menbreg Private_tertiaryX   lji_lag   ex_ideology_lag cgv_demo_lag cpi_lag lntrade_gdp_constantdollar_lag lag_lnresource gdp_growth_lag lngdp_c_const_2010_us_lag worldFDI_gdp_lag kaopen_lag  BIT_China_lag asia eeurop lamerica nafrme  || ccode: , irr



